﻿using System;

namespace ConsoleApp6
{
    class Program
    {
        static void Main(string[] args)
        { }
            class A
        {
            public static int X;

            static A()
            {
                X = B.Y + 1;
                Console.WriteLine("static A()");
            }
        }

        class B
        {
            public static int Y = A.X + 1;
            static B()
            {
                Console.WriteLine("static B()");
            }

            static void Main()
            {
                Console.WriteLine("X = {0}, Y = {1}", A.X, B.Y);
                Console.ReadLine();
            }
        }

         


        }
    }

